
export function menu (oldValue,newValue) {
    let arr = []
    let dtInfo = ''
    for (let i = 0; i < oldValue.length; i++) {
       for (let j = 0; j < newValue.length; j++) {
        //    console.log(oldValue[i].path,"---",newValue[j].path);
          if(oldValue[i].path == newValue[j].path){
              if (oldValue[i].children) {
                dtInfo = JSON.parse(JSON.stringify(oldValue[i]))
                dtInfo.children = menu2(oldValue[i].children , newValue[j].child)
                arr.push(dtInfo)
              }else{
                arr.push(oldValue[i])
              }
          }
       }
    }
    return arr
}
export function menu2(arr1,arr2) {
let arr  = []
for(let i in arr1){
    for(let l in arr2) {
        if (arr1[i].path == arr2[l].path) {
            arr.push(arr1[i])
        }
    }
}
    return arr
}